DX11 INTERSECT OBJECT

Casts a ray with the set origin point along the specified direction and retrieves the distance to the intersection point with the
specified object along said ray.
A proper direction should be normalized (that is, the directionX, directionY and directionZ parameters should each be in the
[-1..+1] range), however the internal direction vector created from those values will be normalized if needed.
To get the point of intersection you start at the ray origin position and add the direction vector multiplied by the returned
distance value. Note that this approach requires that the direction vector is normalized.

  Syntax
Return Float = DX11 INTERSECT OBJECT(object, originX, originY, originZ, directionX, directionY, directionZ)
  Parameters
object
Dword
The object to check for intersections against.
originX
Float
The X coordinate of the point of origin for the ray.
originY
Float
The Y coordinate of the point of origin for the ray.
originZ
Float
The Z coordinate of the point of origin for the ray.
directionX
Float
The X component of the direction of the ray.
directionY
Float
The Y component of the direction of the ray.
directionZ
Float
The Z component of the direction of the ray.

  Returns

The distance along the ray to the intersection with the object, or 0.0 if there was no intersection.

  See also

OBJECT Functions Menu
DX11 Function Categories